<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>css tooltip</title>
  <style>
    .tooltip {
      position: relative;
      border-bottom: 1px dotted black;
    }
    .tooltip:before {
      content: attr(data-tooltip); 
      position: absolute;
      width: 100px;
      background-color: #062B45;
      color: #fff;
      text-align: center;
      padding: 10px;
      line-height: 1.2;
      border-radius: 6px;
      z-index: 1;
      opacity: 0;
      transition: opacity .6s;
      bottom: 125%;
      left: 50%;
      margin-left: -60px;
      font-size: 0.75em;
      visibility: hidden;
    }
    .tooltip:after {
      content: "";
      position: absolute;
      bottom: 75%;
      left: 50%;
      margin-left: -5px;
      border-width: 5px;
      border-style: solid;
      opacity: 0;
      transition: opacity .6s;
      border-color: #062B45 transparent transparent transparent;
      visibility: hidden;
    }
    .tooltip:hover:before, 
    .tooltip:hover:after {
      opacity: 1;
      visibility: visible;
    }
  </style>
</head>
<body>
<h2>
  HTML/CSS tooltip
</h2>
<p>
  鼠标悬浮 <span class="tooltip" data-tooltip="Tooltip Content">这里</span> 就可以看到tooltip的内容了.
</p>
<p>
  你也可以鼠标悬浮 <span class="tooltip" data-tooltip="This is another Tooltip Content">这里</span> 查看另一个tooltip的内容.
</p>
</body>
</html>